﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace Lyh.Core.Result
{
    public static class CustomJsonParser
    {
        public static CustomJsonResult CustomJson(this Controller ctr, object data)
        {
            var result = new CustomJsonResult {Data = data};
            return result;
        }

        public static CustomJsonResult CustomJson(this Controller ctr, object data, bool format, bool camelCase)
        {
            var result = new CustomJsonResult {Data = data, Format = format, CamelCase = camelCase};
            return result;
        }
    }
}